package com.molichuxing.services.infrastructure.service.impl;

import javax.annotation.Resource;

import org.springframework.stereotype.Service;

import com.molichuxing.services.infrastructure.bean.OrderGuarantorBean;
import com.molichuxing.services.infrastructure.dao.OrderGuarantorMapper;
import com.molichuxing.services.infrastructure.service.OrderGuarantorService;

/**
 * <p>
 * 担保人订单关联表，供迁移历史数据使用 服务实现类
 * </p>
 *
 * @author renzhengyu
 * @since 2019-08-12
 */
@Service("orderGuarantorService")
public class OrderGuarantorServiceImpl  implements OrderGuarantorService {

	@Resource
	private OrderGuarantorMapper orderGuarantorMapper;

	/**
	 * 获取订单号
	 * 
	 * @param guarantorId
	 *            担保人id
	 * @return
	 */
	@Override
	public Long getOrderCode(Integer guarantorId) {
		OrderGuarantorBean bean = orderGuarantorMapper.getByGuarantorId(guarantorId);
		if (bean != null) {
			return bean.getOrderCode();
		}
		return null;
	}

}
